#ifndef FTSHOWTEXT_H
#define FTSHOWTEXT_H

#include "IncFreeTrack.h"

enum FTShowTextStyle { bold, italic, none };

struct text_item
{
    int align;
    FTShowTextStyle style;
    QString text;
    int height;
};

class FTShowText : public QWidget
{
    Q_OBJECT
public:
    explicit FTShowText(const QString&, QWidget *parent = 0);

    void paintEvent(QPaintEvent *);
    void mousePressEvent(QMouseEvent *);
    void mouseReleaseEvent(QMouseEvent *);
    void mouseMoveEvent(QMouseEvent *);

    void setCurrentFont( const QFont& );

signals:

public slots:

private:
    QFont font;
    int scroll_pos;
    int total_text_height;
    int scroll_bar_height;
    QList<text_item> text;
    int mouse_start;

    void parseText(const QString&);

};

#endif // FTSHOWTEXT_H
